/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dp1.pucp.Simulacion.VIsta;

import com.dp1.pucp.Modelo.Clases.Demanda;
import com.dp1.pucp.Util.Validaciones;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author ubuntu64
 */
public class ConsultaPedidosGUI2 extends javax.swing.JInternalFrame {

    private JFrame padre;

    /**
     * Creates new form ConsultaPedidosGUI2
     */
    public JFrame getPadre() {
        return padre;
    }

    public JTable getTabla() {
        //para que el controlador actualize la tabla
        return this.tblPedidos;
    }

    public ConsultaPedidosGUI2() {
        initComponents();
        this.setTitle("Atender Pedidos Producción");
        try {
            setFrameIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/hombre_icono.png")));
        } catch (Exception ex) {
        }
    }

    public JTable getTabla1() {

        return this.tblTurno1;

    }

    public JTable getTabla2() {

        return this.tblTurno2;

    }

    public JTable getTabla3() {

        return this.tblTurno3;

    }

    public void llenarTurnos(Demanda demanda1, Demanda demanda2, Demanda demanda3) {

        //Tabla 1
        ((DefaultTableModel) this.getTabla1().getModel()).setRowCount(0);
        int i = 0;
        if (demanda1.getCantPedNormal() > 0) {
            ((DefaultTableModel) this.getTabla1().getModel()).setRowCount(this.getTabla1().getRowCount() + 1);
            this.getTabla1().setValueAt("Galleta Soda", i, 0);
            this.getTabla1().setValueAt(demanda1.getCantPedNormal(), i, 1);
            i++;
        }
        if (demanda1.getCantPedDec() > 0) {
            ((DefaultTableModel) this.getTabla1().getModel()).setRowCount(this.getTabla1().getRowCount() + 1);
            this.getTabla1().setValueAt("Galleta Decorada", i, 0);
            this.getTabla1().setValueAt(demanda1.getCantPedDec(), i, 1);
            i++;
        }
        if (demanda1.getCantPedRell() > 0) {
            ((DefaultTableModel) this.getTabla1().getModel()).setRowCount(this.getTabla1().getRowCount() + 1);
            this.getTabla1().setValueAt("Galleta Rellena", i, 0);
            this.getTabla1().setValueAt(demanda1.getCantPedRell(), i, 1);
        }

        //Tabla 2
        ((DefaultTableModel) this.getTabla2().getModel()).setRowCount(0);
        i = 0;
        if (demanda2.getCantPedNormal() > 0) {
            ((DefaultTableModel) this.getTabla2().getModel()).setRowCount(this.getTabla2().getRowCount() + 1);
            this.getTabla2().setValueAt("Galleta Soda", i, 0);
            this.getTabla2().setValueAt(demanda2.getCantPedNormal(), i, 1);
            i++;
        }
        if (demanda2.getCantPedDec() > 0) {
            ((DefaultTableModel) this.getTabla2().getModel()).setRowCount(this.getTabla2().getRowCount() + 1);
            this.getTabla2().setValueAt("Galleta Decorada", i, 0);
            this.getTabla2().setValueAt(demanda2.getCantPedDec(), i, 1);
            i++;
        }
        if (demanda2.getCantPedRell() > 0) {
            ((DefaultTableModel) this.getTabla2().getModel()).setRowCount(this.getTabla2().getRowCount() + 1);
            this.getTabla2().setValueAt("Galleta Rellena", i, 0);
            this.getTabla2().setValueAt(demanda2.getCantPedRell(), i, 1);
        }

        //Tabla 3
        ((DefaultTableModel) this.getTabla3().getModel()).setRowCount(0);
        i = 0;
        if (demanda3.getCantPedNormal() > 0) {
            ((DefaultTableModel) this.getTabla3().getModel()).setRowCount(this.getTabla3().getRowCount() + 1);
            this.getTabla3().setValueAt("Galleta Soda", i, 0);
            this.getTabla3().setValueAt(demanda3.getCantPedNormal(), i, 1);
            i++;
        }
        if (demanda3.getCantPedDec() > 0) {
            ((DefaultTableModel) this.getTabla3().getModel()).setRowCount(this.getTabla3().getRowCount() + 1);
            this.getTabla3().setValueAt("Galleta Decorada", i, 0);
            this.getTabla3().setValueAt(demanda3.getCantPedDec(), i, 1);
            i++;
        }
        if (demanda3.getCantPedRell() > 0) {
            ((DefaultTableModel) this.getTabla3().getModel()).setRowCount(this.getTabla3().getRowCount() + 1);
            this.getTabla3().setValueAt("Galleta Rellena", i, 0);
            this.getTabla3().setValueAt(demanda3.getCantPedRell(), i, 1);
        }




    }

    public int getGalletaSodaTurno1() {
        int valor = 0;
        for (int i = 0; i < this.getTabla1().getRowCount(); i++) {
            if (this.getTabla1().getValueAt(i, 0) == "Galleta Soda") {
                valor = (int) this.getTabla1().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
        return valor;
    }

    public int getGalletaSodaTurno2() {
        int valor = 0;
        for (int i = 0; i < this.getTabla2().getRowCount(); i++) {
            if (this.getTabla2().getValueAt(i, 0) == "Galleta Soda") {
                valor = (int) this.getTabla2().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaSodaTurno3() {
        int valor = 0;
        for (int i = 0; i < this.getTabla3().getRowCount(); i++) {
            if (this.getTabla3().getValueAt(i, 0) == "Galleta Soda") {
                valor = (int) this.getTabla3().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaDecoradaTurno1() {
        int valor = 0;
        for (int i = 0; i < this.getTabla1().getRowCount(); i++) {
            if (this.getTabla1().getValueAt(i, 0) == "Galleta Decorada") {
                valor = (int) this.getTabla1().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaDecoradaTurno2() {
        int valor = 0;
        for (int i = 0; i < this.getTabla2().getRowCount(); i++) {
            if (this.getTabla2().getValueAt(i, 0) == "Galleta Decorada") {
                valor = (int) this.getTabla2().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaDecoradaTurno3() {
        int valor = 0;
        for (int i = 0; i < this.getTabla3().getRowCount(); i++) {
            if (this.getTabla3().getValueAt(i, 0) == "Galleta Decorada") {
                valor = (int) this.getTabla3().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaRellenaTurno1() {
        int valor = 0;
        for (int i = 0; i < this.getTabla1().getRowCount(); i++) {
            if (this.getTabla1().getValueAt(i, 0) == "Galleta Rellena") {
                valor = (int) this.getTabla1().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaRellenaTurno2() {
        int valor = 0;
        for (int i = 0; i < this.getTabla2().getRowCount(); i++) {
            if (this.getTabla2().getValueAt(i, 0) == "Galleta Rellena") {
                valor = (int) this.getTabla2().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public int getGalletaRellenaTurno3() {
        int valor = 0;
        for (int i = 0; i < this.getTabla2().getRowCount(); i++) {
            if (this.getTabla2().getValueAt(i, 0) == "Galleta Rellena") {
                valor = (int) this.getTabla2().getValueAt(i, 1);
                valor = valor / 30;
            }
        }
//        if ("".equals(txtSodaTurno1.getText())){
//            return 0;
//        }
//        else {
//            return Integer.parseInt(txtSodaTurno1.getText());  
//        } 
        return valor;
    }

    public void addActualizarListener(ActionListener ml) {
        this.btnActualizar.addActionListener(ml);
    }

    public void addGuardarListener(ActionListener ml) {
        this.btnGuardar.addActionListener(ml);
    }

    public void addSimularTurno1Listener(ActionListener ml) {
        this.btnSimularTurno1.addActionListener(ml);
    }

    public void addSimularTurno2Listener(ActionListener ml) {
        this.btnSimularTurno2.addActionListener(ml);
    }

    public void addSimularTurno3Listener(ActionListener ml) {
        this.btnSimularTurno3.addActionListener(ml);
    }

    public void addAsignarTurno1Listener(ActionListener ml) {
        this.btnAsignarTurno1.addActionListener(ml);
    }

    public void addAsignarTurno2Listener(ActionListener ml) {
        this.btnAsignarTurno2.addActionListener(ml);
    }

    public void addAsignarTurno3Listener(ActionListener ml) {
        this.btnAsignarTurno3.addActionListener(ml);
    }

    public void mostrarError(String msn) {
        Validaciones.mostrarMensajeErrorVal(msn);
    }

    public void mostrarAviso(String msn) {
        Validaciones.mostrarMensajeAvisoVal(msn);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel5 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblPedidos = new javax.swing.JTable();
        btnGuardar = new javax.swing.JButton();
        btnActualizar = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        btnSimularTurno1 = new javax.swing.JButton();
        btnAsignarTurno1 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblTurno1 = new javax.swing.JTable();
        jPanel9 = new javax.swing.JPanel();
        btnSimularTurno3 = new javax.swing.JButton();
        btnAsignarTurno3 = new javax.swing.JButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        tblTurno3 = new javax.swing.JTable();
        jPanel10 = new javax.swing.JPanel();
        btnSimularTurno2 = new javax.swing.JButton();
        btnAsignarTurno2 = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        tblTurno2 = new javax.swing.JTable();

        setClosable(true);
        setName(""); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Consulta Pedidos Producto Mensual"));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Pedidos"));

        tblPedidos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Fecha Registro", "Estado"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblPedidos);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        btnGuardar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/save.png"))); // NOI18N
        btnGuardar.setText("Guardar");
        btnGuardar.setBorderPainted(false);
        btnGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnGuardar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnGuardar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnGuardar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnActualizar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/refresh.png"))); // NOI18N
        btnActualizar.setText("Actualizar");
        btnActualizar.setBorderPainted(false);
        btnActualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnActualizar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnActualizar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnActualizar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnActualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Demanda Turno Mañana"));

        btnSimularTurno1.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnSimularTurno1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/settings.png"))); // NOI18N
        btnSimularTurno1.setText("Simular");
        btnSimularTurno1.setBorderPainted(false);
        btnSimularTurno1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSimularTurno1.setMaximumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno1.setMinimumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno1.setPreferredSize(new java.awt.Dimension(57, 29));
        btnSimularTurno1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnAsignarTurno1.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnAsignarTurno1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/checkmark.png"))); // NOI18N
        btnAsignarTurno1.setText("Asignar");
        btnAsignarTurno1.setBorderPainted(false);
        btnAsignarTurno1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAsignarTurno1.setMaximumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno1.setMinimumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno1.setPreferredSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        tblTurno1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Producto", "Cantidad"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(tblTurno1);
        tblTurno1.getColumnModel().getColumn(0).setPreferredWidth(140);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(btnSimularTurno1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 90, Short.MAX_VALUE)
                        .addComponent(btnAsignarTurno1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSimularTurno1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAsignarTurno1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Demanda Turno Noche"));
        jPanel9.setPreferredSize(new java.awt.Dimension(266, 203));

        btnSimularTurno3.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnSimularTurno3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/settings.png"))); // NOI18N
        btnSimularTurno3.setText("Simular");
        btnSimularTurno3.setBorderPainted(false);
        btnSimularTurno3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSimularTurno3.setMaximumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno3.setMinimumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno3.setPreferredSize(new java.awt.Dimension(57, 29));
        btnSimularTurno3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnAsignarTurno3.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnAsignarTurno3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/checkmark.png"))); // NOI18N
        btnAsignarTurno3.setText("Asignar");
        btnAsignarTurno3.setBorderPainted(false);
        btnAsignarTurno3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAsignarTurno3.setMaximumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno3.setMinimumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno3.setPreferredSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        tblTurno3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Producto", "Cantidad"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane5.setViewportView(tblTurno3);
        tblTurno3.getColumnModel().getColumn(0).setResizable(false);
        tblTurno3.getColumnModel().getColumn(0).setPreferredWidth(140);
        tblTurno3.getColumnModel().getColumn(1).setResizable(false);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(btnSimularTurno3, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 90, Short.MAX_VALUE)
                        .addComponent(btnAsignarTurno3, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSimularTurno3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAsignarTurno3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Demanda Turno Tarde"));
        jPanel10.setPreferredSize(new java.awt.Dimension(266, 205));

        btnSimularTurno2.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnSimularTurno2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/settings.png"))); // NOI18N
        btnSimularTurno2.setText("Simular");
        btnSimularTurno2.setBorderPainted(false);
        btnSimularTurno2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSimularTurno2.setMaximumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno2.setMinimumSize(new java.awt.Dimension(57, 29));
        btnSimularTurno2.setPreferredSize(new java.awt.Dimension(57, 29));
        btnSimularTurno2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnAsignarTurno2.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnAsignarTurno2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/checkmark.png"))); // NOI18N
        btnAsignarTurno2.setText("Asignar");
        btnAsignarTurno2.setBorderPainted(false);
        btnAsignarTurno2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAsignarTurno2.setMaximumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno2.setMinimumSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno2.setPreferredSize(new java.awt.Dimension(57, 29));
        btnAsignarTurno2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        tblTurno2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Producto", "Cantidad"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane6.setViewportView(tblTurno2);
        tblTurno2.getColumnModel().getColumn(0).setResizable(false);
        tblTurno2.getColumnModel().getColumn(0).setPreferredWidth(140);
        tblTurno2.getColumnModel().getColumn(1).setResizable(false);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(btnSimularTurno2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 90, Short.MAX_VALUE)
                        .addComponent(btnAsignarTurno2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSimularTurno2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAsignarTurno2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(180, 180, 180)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(btnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(96, 96, 96)
                                .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(34, 34, 34)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanel9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(31, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(30, Short.MAX_VALUE)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(24, 24, 24))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnAsignarTurno1;
    private javax.swing.JButton btnAsignarTurno2;
    private javax.swing.JButton btnAsignarTurno3;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnSimularTurno1;
    private javax.swing.JButton btnSimularTurno2;
    private javax.swing.JButton btnSimularTurno3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JTable tblPedidos;
    private javax.swing.JTable tblTurno1;
    private javax.swing.JTable tblTurno2;
    private javax.swing.JTable tblTurno3;
    // End of variables declaration//GEN-END:variables
}
